<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <ul>
      <li v-for="(item,index) in users" :key="'user1_'+item.id">
        {{ item.name }}
      </li>
    </ul>
    <template>
      <li v-for="(item,index) in users" :key="'user2_'+item.id">
        {{ item.name }}
      </li>
    </template>
    <h4>{{ num }}</h4>
    <input type='button' v-on:click="num++" value="点击">
  </div>

  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        users: [
          { id: 1, name: '张三' },
          { id: 2, name: '李四' },
          { id: 3, name: '丹阳' }
        ],
        userinfo: {
          id: 1,
          name: 'abc'
        },
        num: 1
      }
    })
  </script>
</body>
</html>